home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 4 / BBS in a Box - Macintosh - Volume IV (January 1992) (BBS in a Box).iso / Files / Hyper / B / BBStuff.cpt / BBStuff / background_2794.txt < prev    next >
Encoding:
Text File  |  1987-11-24  |  13.0 KB  |  569 lines

  1. -- background: 2794 from stack: in
  2. -- bmap block id: 2834
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: BBS Load Listings
  6. ----- HyperTalk script -----
  7. on openField
  8.   put the short name of the target into targetName
  9.   if first word of targetName is "Date" then
  10.     put third word of targetName into dateFieldNum
  11.     put "File Name" && dateFieldNum into fileField
  12.     put "Date Field" && dateFieldNum into dateField
  13.     if bkgnd field fileField is not empty and bkgnd field dateField is empty then
  14.       put the short date into bkgnd field dateField
  15.       put the loc of bkgnd field fileField into clickPoint
  16.       click at clickPoint
  17.       tabKey
  18.     end if
  19.   end if
  20. end openField
  21.  
  22.  
  23. -- part 5 (field)
  24. -- low flags: 00
  25. -- high flags: 0000
  26. -- rect: left=20 top=18 right=52 bottom=171
  27. -- title width / last selected line: 0
  28. -- icon id / first selected line: 0 / 0
  29. -- text alignment: 0
  30. -- font id: 3
  31. -- text size: 12
  32. -- style flags: 0
  33. -- line height: 16
  34. -- part name: File Name 1
  35.  
  36.  
  37. -- part 2 (field)
  38. -- low flags: 00
  39. -- high flags: 0000
  40. -- rect: left=177 top=18 right=52 bottom=263
  41. -- title width / last selected line: 0
  42. -- icon id / first selected line: 0 / 0
  43. -- text alignment: 0
  44. -- font id: 3
  45. -- text size: 12
  46. -- style flags: 0
  47. -- line height: 16
  48. -- part name: Date Field 1
  49.  
  50.  
  51. -- part 3 (field)
  52. -- low flags: 00
  53. -- high flags: 0000
  54. -- rect: left=267 top=18 right=52 bottom=503
  55. -- title width / last selected line: 0
  56. -- icon id / first selected line: 0 / 0
  57. -- text alignment: 0
  58. -- font id: 3
  59. -- text size: 12
  60. -- style flags: 0
  61. -- line height: 16
  62. -- part name: Desc Field 1
  63.  
  64.  
  65. -- part 6 (field)
  66. -- low flags: 00
  67. -- high flags: 0000
  68. -- rect: left=20 top=53 right=87 bottom=171
  69. -- title width / last selected line: 0
  70. -- icon id / first selected line: 0 / 0
  71. -- text alignment: 0
  72. -- font id: 3
  73. -- text size: 12
  74. -- style flags: 0
  75. -- line height: 16
  76. -- part name: File Name 2
  77.  
  78.  
  79. -- part 14 (field)
  80. -- low flags: 00
  81. -- high flags: 0000
  82. -- rect: left=177 top=53 right=87 bottom=263
  83. -- title width / last selected line: 0
  84. -- icon id / first selected line: 0 / 0
  85. -- text alignment: 0
  86. -- font id: 3
  87. -- text size: 12
  88. -- style flags: 0
  89. -- line height: 16
  90. -- part name: Date Field 2
  91.  
  92.  
  93. -- part 22 (field)
  94. -- low flags: 00
  95. -- high flags: 0000
  96. -- rect: left=267 top=53 right=87 bottom=503
  97. -- title width / last selected line: 0
  98. -- icon id / first selected line: 0 / 0
  99. -- text alignment: 0
  100. -- font id: 3
  101. -- text size: 12
  102. -- style flags: 0
  103. -- line height: 16
  104. -- part name: Desc Field 2
  105.  
  106.  
  107. -- part 7 (field)
  108. -- low flags: 00
  109. -- high flags: 0000
  110. -- rect: left=20 top=88 right=122 bottom=171
  111. -- title width / last selected line: 0
  112. -- icon id / first selected line: 0 / 0
  113. -- text alignment: 0
  114. -- font id: 3
  115. -- text size: 12
  116. -- style flags: 0
  117. -- line height: 16
  118. -- part name: File Name 3
  119.  
  120.  
  121. -- part 15 (field)
  122. -- low flags: 00
  123. -- high flags: 0000
  124. -- rect: left=177 top=88 right=122 bottom=263
  125. -- title width / last selected line: 0
  126. -- icon id / first selected line: 0 / 0
  127. -- text alignment: 0
  128. -- font id: 3
  129. -- text size: 12
  130. -- style flags: 0
  131. -- line height: 16
  132. -- part name: Date Field 3
  133.  
  134.  
  135. -- part 23 (field)
  136. -- low flags: 00
  137. -- high flags: 0000
  138. -- rect: left=267 top=88 right=122 bottom=503
  139. -- title width / last selected line: 0
  140. -- icon id / first selected line: 0 / 0
  141. -- text alignment: 0
  142. -- font id: 3
  143. -- text size: 12
  144. -- style flags: 0
  145. -- line height: 16
  146. -- part name: Desc Field 3
  147.  
  148.  
  149. -- part 8 (field)
  150. -- low flags: 00
  151. -- high flags: 0000
  152. -- rect: left=20 top=123 right=157 bottom=171
  153. -- title width / last selected line: 0
  154. -- icon id / first selected line: 0 / 0
  155. -- text alignment: 0
  156. -- font id: 3
  157. -- text size: 12
  158. -- style flags: 0
  159. -- line height: 16
  160. -- part name: File Name 4
  161.  
  162.  
  163. -- part 16 (field)
  164. -- low flags: 00
  165. -- high flags: 0000
  166. -- rect: left=177 top=123 right=157 bottom=263
  167. -- title width / last selected line: 0
  168. -- icon id / first selected line: 0 / 0
  169. -- text alignment: 0
  170. -- font id: 3
  171. -- text size: 12
  172. -- style flags: 0
  173. -- line height: 16
  174. -- part name: Date Field 4
  175.  
  176.  
  177. -- part 24 (field)
  178. -- low flags: 00
  179. -- high flags: 0000
  180. -- rect: left=267 top=123 right=157 bottom=503
  181. -- title width / last selected line: 0
  182. -- icon id / first selected line: 0 / 0
  183. -- text alignment: 0
  184. -- font id: 3
  185. -- text size: 12
  186. -- style flags: 0
  187. -- line height: 16
  188. -- part name: Desc Field 4
  189.  
  190.  
  191. -- part 9 (field)
  192. -- low flags: 00
  193. -- high flags: 0000
  194. -- rect: left=20 top=158 right=192 bottom=171
  195. -- title width / last selected line: 0
  196. -- icon id / first selected line: 0 / 0
  197. -- text alignment: 0
  198. -- font id: 3
  199. -- text size: 12
  200. -- style flags: 0
  201. -- line height: 16
  202. -- part name: File Name 5
  203.  
  204.  
  205. -- part 17 (field)
  206. -- low flags: 00
  207. -- high flags: 0000
  208. -- rect: left=177 top=158 right=192 bottom=263
  209. -- title width / last selected line: 0
  210. -- icon id / first selected line: 0 / 0
  211. -- text alignment: 0
  212. -- font id: 3
  213. -- text size: 12
  214. -- style flags: 0
  215. -- line height: 16
  216. -- part name: Date Field 5
  217.  
  218.  
  219. -- part 25 (field)
  220. -- low flags: 00
  221. -- high flags: 0000
  222. -- rect: left=267 top=158 right=192 bottom=503
  223. -- title width / last selected line: 0
  224. -- icon id / first selected line: 0 / 0
  225. -- text alignment: 0
  226. -- font id: 3
  227. -- text size: 12
  228. -- style flags: 0
  229. -- line height: 16
  230. -- part name: Desc Field 5
  231.  
  232.  
  233. -- part 10 (field)
  234. -- low flags: 00
  235. -- high flags: 0000
  236. -- rect: left=20 top=193 right=227 bottom=171
  237. -- title width / last selected line: 0
  238. -- icon id / first selected line: 0 / 0
  239. -- text alignment: 0
  240. -- font id: 3
  241. -- text size: 12
  242. -- style flags: 0
  243. -- line height: 16
  244. -- part name: File Name 6
  245.  
  246.  
  247. -- part 18 (field)
  248. -- low flags: 00
  249. -- high flags: 0000
  250. -- rect: left=177 top=193 right=227 bottom=263
  251. -- title width / last selected line: 0
  252. -- icon id / first selected line: 0 / 0
  253. -- text alignment: 0
  254. -- font id: 3
  255. -- text size: 12
  256. -- style flags: 0
  257. -- line height: 16
  258. -- part name: Date Field 6
  259.  
  260.  
  261. -- part 26 (field)
  262. -- low flags: 00
  263. -- high flags: 0000
  264. -- rect: left=267 top=193 right=227 bottom=503
  265. -- title width / last selected line: 0
  266. -- icon id / first selected line: 0 / 0
  267. -- text alignment: 0
  268. -- font id: 3
  269. -- text size: 12
  270. -- style flags: 0
  271. -- line height: 16
  272. -- part name: Desc Field 6
  273.  
  274.  
  275. -- part 11 (field)
  276. -- low flags: 00
  277. -- high flags: 0000
  278. -- rect: left=20 top=228 right=262 bottom=171
  279. -- title width / last selected line: 0
  280. -- icon id / first selected line: 0 / 0
  281. -- text alignment: 0
  282. -- font id: 3
  283. -- text size: 12
  284. -- style flags: 0
  285. -- line height: 16
  286. -- part name: File Name 7
  287.  
  288.  
  289. -- part 19 (field)
  290. -- low flags: 00
  291. -- high flags: 0000
  292. -- rect: left=177 top=228 right=262 bottom=263
  293. -- title width / last selected line: 0
  294. -- icon id / first selected line: 0 / 0
  295. -- text alignment: 0
  296. -- font id: 3
  297. -- text size: 12
  298. -- style flags: 0
  299. -- line height: 16
  300. -- part name: Date Field 7
  301.  
  302.  
  303. -- part 27 (field)
  304. -- low flags: 00
  305. -- high flags: 0000
  306. -- rect: left=267 top=228 right=262 bottom=503
  307. -- title width / last selected line: 0
  308. -- icon id / first selected line: 0 / 0
  309. -- text alignment: 0
  310. -- font id: 3
  311. -- text size: 12
  312. -- style flags: 0
  313. -- line height: 16
  314. -- part name: Desc Field 7
  315.  
  316.  
  317. -- part 12 (field)
  318. -- low flags: 00
  319. -- high flags: 0000
  320. -- rect: left=20 top=264 right=298 bottom=171
  321. -- title width / last selected line: 0
  322. -- icon id / first selected line: 0 / 0
  323. -- text alignment: 0
  324. -- font id: 3
  325. -- text size: 12
  326. -- style flags: 0
  327. -- line height: 16
  328. -- part name: File Name 8
  329.  
  330.  
  331. -- part 20 (field)
  332. -- low flags: 00
  333. -- high flags: 0000
  334. -- rect: left=177 top=264 right=298 bottom=263
  335. -- title width / last selected line: 0
  336. -- icon id / first selected line: 0 / 0
  337. -- text alignment: 0
  338. -- font id: 3
  339. -- text size: 12
  340. -- style flags: 0
  341. -- line height: 16
  342. -- part name: Date Field 8
  343.  
  344.  
  345. -- part 28 (field)
  346. -- low flags: 00
  347. -- high flags: 0000
  348. -- rect: left=267 top=264 right=298 bottom=503
  349. -- title width / last selected line: 0
  350. -- icon id / first selected line: 0 / 0
  351. -- text alignment: 0
  352. -- font id: 3
  353. -- text size: 12
  354. -- style flags: 0
  355. -- line height: 16
  356. -- part name: Desc Field 8
  357. ----- HyperTalk script -----
  358. on closeField
  359.   click at 0,0
  360.   if bkgnd field "Desc Field 8" is not empty then
  361.     answer "Do you wish to add another file?" with "No" or "Yes"
  362.     if it is "Yes" then
  363.       click at location of bkgnd button "Add File"
  364.     end if
  365.   end if
  366. end closeField
  367.  
  368.  
  369.  
  370. -- part 29 (field)
  371. -- low flags: 00
  372. -- high flags: 0002
  373. -- rect: left=8 top=321 right=339 bottom=136
  374. -- title width / last selected line: 0
  375. -- icon id / first selected line: 0 / 0
  376. -- text alignment: 0
  377. -- font id: 3
  378. -- text size: 12
  379. -- style flags: 0
  380. -- line height: 16
  381. -- part name: BBS Name
  382.  
  383.  
  384. -- part 30 (field)
  385. -- low flags: 00
  386. -- high flags: 0002
  387. -- rect: left=146 top=321 right=339 bottom=233
  388. -- title width / last selected line: 0
  389. -- icon id / first selected line: 0 / 0
  390. -- text alignment: 0
  391. -- font id: 3
  392. -- text size: 12
  393. -- style flags: 0
  394. -- line height: 16
  395. -- part name: Load Direction
  396.  
  397.  
  398. -- part 31 (button)
  399. -- low flags: 00
  400. -- high flags: 0000
  401. -- rect: left=476 top=317 right=340 bottom=502
  402. -- title width / last selected line: 0
  403. -- icon id / first selected line: 1012 / 1012
  404. -- text alignment: 1
  405. -- font id: 0
  406. -- text size: 12
  407. -- style flags: 0
  408. -- line height: 16
  409. -- part name: Main Card
  410. ----- HyperTalk script -----
  411. on mouseUp
  412.   pop card
  413. end mouseUp
  414.  
  415.  
  416.  
  417.  
  418. -- part 32 (button)
  419. -- low flags: 00
  420. -- high flags: 0000
  421. -- rect: left=435 top=317 right=341 bottom=463
  422. -- title width / last selected line: 0
  423. -- icon id / first selected line: 1013 / 1013
  424. -- text alignment: 1
  425. -- font id: 0
  426. -- text size: 12
  427. -- style flags: 0
  428. -- line height: 16
  429. -- part name: Next Card
  430. ----- HyperTalk script -----
  431. on mouseUp
  432.   go next card
  433. end mouseUp
  434.  
  435.  
  436.  
  437. -- part 33 (button)
  438. -- low flags: 00
  439. -- high flags: 0000
  440. -- rect: left=404 top=317 right=341 bottom=433
  441. -- title width / last selected line: 0
  442. -- icon id / first selected line: 1014 / 1014
  443. -- text alignment: 1
  444. -- font id: 0
  445. -- text size: 12
  446. -- style flags: 0
  447. -- line height: 16
  448. -- part name: Previous card
  449. ----- HyperTalk script -----
  450. on mouseUp
  451.   go previous card
  452. end mouseUp
  453.  
  454.  
  455.  
  456. -- part 34 (button)
  457. -- low flags: 00
  458. -- high flags: A004
  459. -- rect: left=319 top=317 right=341 bottom=393
  460. -- title width / last selected line: 0
  461. -- icon id / first selected line: 0 / 0
  462. -- text alignment: 1
  463. -- font id: 0
  464. -- text size: 12
  465. -- style flags: 0
  466. -- line height: 16
  467. -- part name: Add File
  468. ----- HyperTalk script -----
  469. on mouseUp
  470.   set the cursor to 4
  471.   put bkgnd field "BBS Name" into BBSTitle
  472.   put bkgnd field "Load Direction" into loadDirection
  473.   put the name of this background into thisBkgnd
  474.   --  set lockScreen to true
  475.   repeat while rightCardType(BBSTitle,loadDirection,thisBkgnd)
  476.     if checkForEmptyField() = "Found" then
  477.       set lockScreen to false
  478.       exit mouseUp
  479.     end if
  480.     go to next card --the card's fields are full
  481.   end repeat
  482.   go to previous card --add new card of the same type
  483.   doMenu "New Card"
  484.   --  set lockScreen to false
  485.   set lockText of bkgnd field "BBS Name" to false
  486.   set lockText of bkgnd field "Load Direction" to false
  487.   put BBSTitle into bkgnd field "BBS Name"
  488.   put loadDirection into bkgnd field "Load Direction"
  489.   set lockText of bkgnd field "BBS Name" to true
  490.   set lockText of bkgnd field "Load Direction" to true
  491.   send tabKey
  492. end mouseUp
  493.  
  494. function rightCardType BBSTitle,loadDirection,thisBkgnd
  495. if the name of this background = thisBkgnd and bkgnd field "BBS Name" = BBSTitle and bkgnd field "Load Direction" = loadDirection then
  496.   put true into checkResult
  497. else
  498.   put false into checkResult
  499. end if
  500. return checkResult
  501. end rightCardType
  502.  
  503. function checkForEmptyField
  504. repeat with nameFieldNum = 1 to 8
  505.   put "File Name" && nameFieldNum into nameField
  506.   if first char of bkgnd field nameField is empty or first char of bkgnd field nameField = space then
  507.     get location of bkgnd field nameField
  508.     subtract textHeight of bkgnd field nameField from second item of it
  509.     click at it
  510.     return "Found"
  511.   end if
  512. end repeat
  513. return "Full"
  514. end checkForEmptyField
  515.  
  516.  
  517.  
  518. -- part 35 (button)
  519. -- low flags: 00
  520. -- high flags: A004
  521. -- rect: left=260 top=317 right=341 bottom=316
  522. -- title width / last selected line: 0
  523. -- icon id / first selected line: 0 / 0
  524. -- text alignment: 1
  525. -- font id: 0
  526. -- text size: 12
  527. -- style flags: 0
  528. -- line height: 16
  529. -- part name: Latest
  530. ----- HyperTalk script -----
  531. on mouseUp
  532.   set lockScreen to true
  533.   set the cursor to 4
  534.   put bkgnd field "BBS Name" into BBSTitle
  535.   put bkgnd field "Load Direction" into loadDirection
  536.   put the name of this background into thisBkgnd
  537.   repeat while rightCardType(BBSTitle,loadDirection,thisBkgnd)
  538.     if checkForEmptyField() = "Found" then
  539.       set lockScreen to false
  540.       exit mouseUp
  541.     end if
  542.     go to next card --the card's fields are full
  543.   end repeat
  544.   go to previous card --this was latest card
  545. end mouseUp
  546.  
  547. function rightCardType BBSTitle,loadDirection,thisBkgnd
  548. if the name of this background = thisBkgnd and bkgnd field "BBS Name" = BBSTitle and bkgnd field "Load Direction" = loadDirection then
  549.   put true into checkResult
  550. else
  551.   put false into checkResult
  552. end if
  553. return checkResult
  554. end rightCardType
  555.  
  556. function checkForEmptyField
  557. repeat with nameFieldNum = 1 to 8
  558.   put "File Name" && nameFieldNum into nameField
  559.   if first char of bkgnd field nameField is empty or first char of bkgnd field nameField = space then
  560.     get location of bkgnd field nameField
  561.     subtract textHeight of bkgnd field nameField from second item of it
  562.     click at it
  563.     return "Found"
  564.   end if
  565. end repeat
  566. return "Full"
  567. end checkForEmptyField
  568.  
  569.